package xin.lhuo.we.server.exception;

import xin.lhuo.we.server.enums.ResultEnum;

/**
 * @author Lhuo
 * @date 2019/5/5 10:24
 */
public class WeException extends RuntimeException {
    private Integer code;

    public Integer getCode() {
        return code;
    }

    public WeException(ResultEnum resultEnum) {

        super(resultEnum.getMsg());
        this.code = resultEnum.getCode();
    }

    public WeException(Integer code, String msg) {
        super(msg);
        this.code = code;
    }
}
